Avoid crashes on MS-Windows when JPEG images are too large.
authorEli Zaretskii <eliz@gnu.org>
Wed, 19 Feb 2014 17:26:14 +0000 (19:26 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 19 Feb 2014 17:26:14 +0000 (19:26 +0200)
commit424252e4023b041f9532ef963aa4ff1aa1429d82
tree9d0484c9bd0929935ad301885824f623cf11d982
parent94fe75cc29c2919558cc7715e74118f27386b26f
Avoid crashes on MS-Windows when JPEG images are too large.

 src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
 CreateDIBSection returns an error indication, zero out *ximg after
 destroying the image.  This avoids crashes in memory allocations
 due to the fact that some of the callers also call
 x_destroy_x_image, which will attempt to free an already free'd
 block of memory.
src/ChangeLog
src/image.c